negotiator.actions
Class Action

java.lang.Object
  extended by negotiator.actions.Action
Direct Known Subclasses:
Accept, EndNegotiation, IllegalAction, Offer

public abstract class Action
extends java.lang.Object

Class which symbolizes a high level action.

Author:
Tim Baarslag and Dmytro Tykhonov

Constructor Summary
Action()
          Empty constructor used for inheritance.
Action(AgentID agentID)
          Constructor which sets the agentID of an agent.
 
Method Summary
 AgentID getAgent()
          Returns the ID of the agent which created the action.
static Bid getBidFromAction(Action currentAction)
          Method which returns the bid of the current action if it is of the type Offer or else Null.
abstract  java.lang.String toString()
          Enforces that actions implements a string-representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Action

public Action()
Empty constructor used for inheritance.


Action

public Action(AgentID agentID)
Constructor which sets the agentID of an agent.

Parameters:
agentID - of the agent which created the action.
Method Detail

getAgent

public AgentID getAgent()
Returns the ID of the agent which created the action.

Returns:
ID of the agent.

toString

public abstract java.lang.String toString()
Enforces that actions implements a string-representation.

Overrides:
toString in class java.lang.Object

getBidFromAction

public static Bid getBidFromAction(Action currentAction)
Method which returns the bid of the current action if it is of the type Offer or else Null.

Parameters:
currentAction - of which we want the offer.
Returns:
bid specifies by this action or null if there is none.